package dp.ua.epic.urlcoding;

import org.apache.wicket.Page;
import org.apache.wicket.request.target.coding.HybridUrlCodingStrategy;

/**
 * UrlCodingStrategy that will give the same * URL for every version of a page.
 *
 * This idea was taken from http://day-to-day-stuff.blogspot.com/2008/10/wicket-extreme-consistent-urls.html
 *
 * @author Erik van Oosten
 */
public class NonVersionedHybridUrlCodingStrategy extends HybridUrlCodingStrategy {

    public NonVersionedHybridUrlCodingStrategy(String mountPath, Class<? extends Page> pageClass) {
         super(mountPath, pageClass);
    }

    public NonVersionedHybridUrlCodingStrategy(String mountPath, Class<? extends Page> pageClass, boolean redirectOnBookmarkableRequest) {
        super(mountPath, pageClass, redirectOnBookmarkableRequest);
    }

    @Override
    protected String addPageInfo( String url, PageInfo pageInfo) {
        return url;
    }
}